using B.S.Database.ErrorCode;
using MediatR;

namespace B.S.Database.Write.Api.Application.Commands.Image
{
    public class PictureDeleteCommands : IRequest<Apiresult<object>>
    {
        /// <summary>
        /// 溯源ID
        /// </summary>
        public int TraceabilityId { get; set; }

        /// <summary>
        /// 图片类型：Inspection_Repor, Livestock_Certification, Certification_Documents, Food_Safety, Raw_Material, Auxiliary_Materials, Additive_Materials, Packaging_Materials, Enterprise_Image
        /// </summary>
        public string ImageType { get; set; }

        /// <summary>
        /// 要删除的图片URL（可选，如果不提供则删除该字段的所有图片）
        /// </summary>
        public string? ImageUrl { get; set; }

        /// <summary>
        /// 要删除的图片索引（从0开始，可选，如果提供则删除指定索引的图片）
        /// </summary>
        public int? ImageIndex { get; set; }

        /// <summary>
        /// 分隔符，用于分割多个图片URL，默认为逗号
        /// </summary>
        public string Separator { get; set; } = ",";

        /// <summary>
        /// 是否同时删除七牛云上的文件
        /// </summary>
        public bool DeleteFromQiniu { get; set; } = true;
    }
} 